class Ammo extends Item
{
   private int weapon;
   private int[] ammoBoost = {30, 10, 5};
  
   public Ammo(PVector location, Player target, Terrain terrain, int weapon)
   {
     super(location, target, terrain);
     this.weapon = weapon;
     setImage();
     
     this.item = new Cube(graphic, new PVector(255, 255, 255));
   }
   
   private void setImage()
   {
     if (weapon == 2)
     {
       graphic = loadImage("machineGun.jpg");
     }
     else if (weapon == 3)
     {
       graphic = loadImage("shotGun.jpg");
     }
     else if (weapon == 4)
     {
       graphic = loadImage("sniper.png");
     }
   }
   
   public void act()
   {
     target.addAmmo(weapon, ammoBoost[weapon-2]);
   }
  
}
